/**
 * 
 */
package com.bolbachchan.blog.controller.common;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.bolbachchan.blog.form.common.LoginFormObj;
import com.bolbachchan.blog.validator.common.LoginValidator;

/**
 * @author Chaitanya
 * 
 */
@Controller
@RequestMapping(value = "login")
public class LoginController {

    @Autowired
    private LoginValidator validator;

    @RequestMapping(method = RequestMethod.GET)
    public String getView(Model model, @ModelAttribute("fbb") LoginFormObj fbb) {
	model.addAttribute(fbb);

	model.addAttribute("uri", "/j_spring_security_check");
	model.addAttribute("username", "j_username");
	model.addAttribute("password", "j_password");
	return "login";
    }

}
